﻿<%@ Control Language="VB" AutoEventWireup="false" CodeFile="SearchRegionVolunteerControl.ascx.vb"
    Inherits="WebForm_SearchControl_SearchRegionVolunteerControl" %>
<%--<script>
Sys.Application.add_load(
 function(sender, eventArgs) {

	$('input[name*="cbCheckAll"],input[name*="cbCheckAll"]').click(function(){
		$('input[name*="CheckBox1"]').attr('checked', this.checked);
	});


});
</script>--%>
<script src="<%=Me.ResolveUrl("~/js/JScript.js") %>" type="text/javascript"></script>

<asp:Panel ID="panel1" runat="server" BackColor="white" BorderWidth="1" Style="cursor: move;"
    Width="500">
    <br />
    <div align="center">
        <asp:Label ID="lblTitle" runat="server" Text="<%$ Resources:Title %>" SkinID="title"></asp:Label>
    </div>
    <br />
    <table align="center">
        <tr>
            <td>
                <table>
                    <tr>
                        <asp:PlaceHolder ID="trRegion" runat="server">
                            <td align="right">
                                <asp:Label ID="lblRegion" runat="server" Text="<%$ Resources:Region %>"></asp:Label>
                            </td>
                            <td align="left">
                                <asp:DropDownList ID="ddlRegion" runat="server" DataTextField="RegionName" DataValueField="RegionID"
                                    AutoPostBack="True">
                                </asp:DropDownList>
                            </td>
                            <td align="right">
                                <asp:Label ID="lblRegion2" runat="server" Text="<%$ Resources:Region2 %>"></asp:Label>
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlRegion2" runat="server" DataTextField="RegionName" DataValueField="RegionID">
                                </asp:DropDownList>
                            </td>
                        </asp:PlaceHolder>
                    </tr>
                    <tr>
                        <td align="right">
                            <asp:Label ID="lblVolunteerId" runat="server" Text="<%$ Resources:VolunteerId %>"></asp:Label>
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txtVolunteerId" runat="server" MaxLength="20" Width="150px"></asp:TextBox>
                        </td>
                        <td>
                            &nbsp;
                            <asp:Label ID="lblVolunteerName" runat="server" Text="<%$ Resources:VolunteerName %>"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtVolunteerName" runat="server" MaxLength="20" Width="150px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            <asp:Label ID="lblTEL" runat="server" Text="<%$ Resources:TEL %>"></asp:Label>
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txtTEL" runat="server" MaxLength="20" Width="150px"></asp:TextBox>
                        </td>
                        <td>
                            &nbsp;
                        </td>
                        <td align="left">
                            <asp:CheckBox ID="chkNoOrgVolunteer" runat="server" meta:resourcekey="chkNonActiveVolunteer">
                            </asp:CheckBox>
                        </td>
                        <td>
                            &nbsp;<asp:Button ID="btnQuery" runat="server" meta:resourcekey="btnQuery" Text="<%$ Resources:Query %>" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <My:MyGridView ID="GridView_Volunteers" runat="server" SkinID="pager" DataKeyNames="VolunteerID"
                    AllowPaging="True" AllowSorting="True" AllowHoverEffect="False" AllowHoverSelect="False"
                    MySortDirection="Ascending" EmptyDataText="<%$ Resources:NoData %>">
                    <Columns>
                        <asp:TemplateField>
                            <itemtemplate>
                            <asp:CheckBox ID="CheckBox1" runat="server" Enabled='<%# Bind("IsEnable") %>' />
                        </itemtemplate>
                            <headertemplate>
                            <input id="cbCheckAll" onclick="Check2(this,'GridView_Volunteers','CheckBox1');"
                                runat="server" type="checkbox" />
                    <%--        <asp:CheckBox ID="cbCheckAll" runat="server" OnCheckedChanged="cbCheckAll_CheckedChanged"
                                        AutoPostBack="true"></asp:CheckBox>--%>
                            <asp:Label ID="Label2" runat="server" Text="全選"></asp:Label>
                        </headertemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="VolunteerID" HeaderText="<%$ Resources:VolunteerID %>"
                            SortExpression="VolunteerID" />
                        <asp:BoundField DataField="VolunteerName" HeaderText="<%$ Resources:VolunteerName %>"
                            SortExpression="VolunteerName" />
                        <asp:BoundField DataField="MobilePhone" HeaderText="<%$ Resources:MobilePhone %>"
                            SortExpression="MobilePhone" />
                    </Columns>
                </My:MyGridView>
                <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" OldValuesParameterFormatString="original_{0}"
                    SelectMethod="BLL_Select" TypeName="BLL_ManageVolunteer_SearchRegionVolunteerControl">
                    <SelectParameters>
                        <asp:Parameter Name="Region" Type="String" />
                        <asp:Parameter Name="Region2" Type="String" />
                        <asp:Parameter Name="VolunteerId" Type="String" />
                        <asp:Parameter Name="VolunteerName" Type="String" />
                        <asp:Parameter Name="TEL" Type="String" />
                        <asp:Parameter Name="VOrganizationID" Type="String" />
                        <asp:Parameter Name="NoOrgVolunteer" Type="Boolean" />
                        <%--<asp:ControlParameter ControlID="chkNoOrgVolunteer" PropertyName="Checked" Type="Boolean" />--%>
                        <asp:Parameter Name="OrganizationID" Type="Int32" />
                    </SelectParameters>
                </asp:ObjectDataSource>
            </td>
        </tr>
        <tr>
            <td align="center">
                <asp:Button ID="btnOK" runat="server" Text="<%$ Resources:OK%>" />
                <asp:Button ID="btnCancel" runat="server" Text="<%$ Resources:Cancel%>" />
            </td>
        </tr>
    </table>
    <br />
</asp:Panel>
<asp:Button ID="btnDummy" runat="server" Style="display: none" SkinID="null" />
<ajaxToolkit:ModalPopupExtender ID="mpSearch" runat="server" TargetControlID="btnDummy"
    PopupControlID="panel1" CancelControlID="btnCancel" PopupDragHandleControlID="panel1" />
